﻿using Iworld.Author.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace Iworld.Author.Service.Client.Export
{
    /// <summary>
    /// 帐变记录
    /// </summary>
    [DataContract]
    public class GoldsChangeRecordExport
    {
        /// <summary>
        /// 所属用户
        /// </summary>
        [DataMember]
        public AuthorExport Owner { get; set; }

        /// <summary>
        /// 分变类型,比如投注,赠送,充值等等
        /// </summary>
        [DataMember]
        public string Type { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        [DataMember]
        public string Description { get; set; }

        /// <summary>
        /// 收入
        /// </summary>
        [DataMember]
        public double Income { get; set; }

        /// <summary>
        /// 支出
        /// </summary>
        [DataMember]
        public double Expenses { get; set; }

        /// <summary>
        /// 实际变动
        /// </summary>
        [DataMember]
        public double Sum { set; get; }

        /// <summary>
        /// 当前余额
        /// </summary>
        [DataMember]
        public double Golds { get; set; }

        [DataMember]
        public DateTime CreateTime { set; get; }

        public GoldsChangeRecordExport(GoldChangeRecord x)
        {
            this.Owner = new AuthorExport(x.Owner);
            this.Type = x.Type;
            this.Description = x.Description;
            this.Income = x.Income;
            this.Expenses = x.Expenses;
            this.Sum = x.Sum;
            this.Golds = x.Golds;
        }
    }
}
